pp108 : Event Listeners in WS-AppServer

Event Listeners in WS-AppServer

This topic describes the event listeners in WS-AppServer.

The following table contains a list of all the event listeners along with the implicit and explicit methods required to use them.

Action Performed

Name of the Listener (Object Level)

Name of the Listener (Attribute Level)

Context in which the Listener is Used

Implicit

Explicit

Implicit

Explicit

Initialize

onInitialize

IObjectInitializeListener

onInitialize_ <attribute name>

IAttributeInitializeListener

When an object or an attribute is initialized

Apply Constraints

onConstraint

IObjectConstraintListener
Note: To apply and validate constraints on multiple objects (in a transaction), use ITransactionConstraintListener

onConstraint_<attribute name>
Note: At the attribute level, this constraint event will not be fired on delete request.

IAttributeConstraintListener

When validation constraints are applied on objects and attributes, and violations if any are reported

Check Availability

-

-

onAvailability_<attribute name>

IAttributeAvailabilityListener

When an attribute's availability is set

Define Access Control

onAccess

IObjectAccessListener

onAccess_<attribute name>

IAttributeAccessListener

When the access level of an object or an attribute is set at the server-level

Set Display (UI)

onDisplay

IObjectDisplayListener

onDisplay_<attribute name>

IAttributeDisplayListener

When the display of an object or an attribute on the UI is determined based on the access level

Set Values

-

-

onValues_<attribute name>

IAttributeValuesListener

When values (options) for an attribute are set

After Object Load

onAfterLoad

IAfterLoadListener

-

When a certain activity is performed after loading an object

Before Attribute Change

-

-

onBeforeChange_<attribute name>

IBeforeAttributeChangeListener

When a certain activity is performed before an attribute's value changes

After Attribute Change

-

-

onAfterChange_<attribute name>

IAfterAttributeChangeListener

When a certain activity is performed after an attribute's value changes

Before Object Insert

onBeforeInsert

IBeforeInsertListener

-

-

When a certain activity is performed before inserting an object

Upon Object Insert

onInsert

-

-

-

When a certain activity is performed immediately after an object is inserted

After Object Insert

onAfterInsert

IAfterInsertListener

-

-

When a certain activity is performed after inserting an object

Before Object Update

onBeforeUpdate

IBeforeUpdateListener

-

-

When a certain activity is performed before updating an object

Upon Object Update

onUpdate

-

-

-

When a certain activity is performed immediately after an object is updated

After Object Update

onAfterUpdate

IAfterUpdateListener

-

-

When a certain activity is performed after updating an object

Before Object Delete

onBeforeDelete

IBeforeDeleteListener

-

-

When a certain activity is performed before deleting an object

Upon Object Delete

onDelete

-

-

-

When a certain activity is performed immediately after an object is deleted

After Object Delete

onAfterDelete

IAfterDeleteListener

-

-

When a certain activity is performed after deleting an object

Before Transaction Commit

onBeforeCommit

IBeforeCommitListener

-

-

When a certain activity is performed before committing a transaction

After Transaction Commit

onAfterCommit

IAfterCommitListener

-

-

When a certain activity is performed after committing a transaction

Before Transaction Abort

onBeforeAbort

IBeforeAbortListener

-

-

When a certain activity is performed before aborting a transaction

After Transaction Abort

onAfterAbort

IAfterAbortListener

-

-

When a certain activity is performed after aborting a transaction

When WS-AppServer Processor starts or stops


  • onOpenConnector
  • onCloseConnector

IOnBsfConnector

-

-

When a certain activity is performed when the WS-AppServer processor starts or stops

Evaluate constraints on transaction objects

onTransactionConstraint

ITransactionConstraintListener

-

-

When objects have to be evaluated for any constraint violation

Retrieve all objects participating in a transaction

onReceive

IUpdateBodyBlockListener

-

-

When there is a need to change the behaviour of objects participating in a transaction, to fulfill business requirements



For a detailed description of each event listener, see WS-AppServer SDK.

Tip: Click here to watch the video.

Related concepts

Event
Event Listener
Event Object
Event Trigger

Related reference

Types of Event Listeners